<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>IT服务信息平台  呼叫详细信息</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<script language="JavaScript" type="text/javascript" src="css/editor/wysiwyg.js"></script>
	<script type='text/javascript' src='/gserv/dwr/interface/commDaoImpl.js'></script>
    <script type='text/javascript' src='/gserv/dwr/engine.js'></script>
	
	<script type="text/javascript" language="javascript" src="css/my.js"></script>
	<link rel="stylesheet" type="text/css" href="css/mystyle.css">
	<script type="text/javascript">
		//var callId=document.getElementById('callId').value;
		function checkCall(callId,userId){
			commDaoImpl.checkCall(callId,userId,sub);
		}
		function sub(data)
		{
			if(data){
				document.coll.submit();
				alert("收藏成功!");
				window.history.go(-1);	
			}
			else
				alert("此呼叫您已收藏!");
		}
		function send()
		{
			alert("请先登录!");
		}
	</script>
  </head>
  
  <body>

  <jsp:include page="header.jsp"></jsp:include>
  <div style="width: 800px;margin: 0 auto;">
  	<div class="navigation"  align="left"><table><tr class="navigation" ><td>你所在位置:<a href="gongxu/index.jsp">首页</a>><a href="gongxu/callAll.jsp">供需呼叫</a>>呼叫详细信息</td></tr></table></div>
 	<div style="width: 550px;float: left;border-style: solid;border-width: 1px;">
  <!-- 详细信息 -->
  	<div style="width: 550px;background-color: #C8DBDB;">
  		<div style="width: 98%;margin: 0 auto;border-style: solid;border-width: 1px;margin-top: 5px;margin-bottom:5px; background-color: #E8E8E8;">
  		<table width="100%" cellpadding="0" cellspacing="0" align="center" style="color: #004848;">
  			<tr >
  				<td align="right">呼叫类别:</td><td align="left"><s:property value="callInfo.callSort.callSortName"/></td>
  				<td rowspan="6">
  					<table>
			  			<tr><td>
			  			<table style="font-size: 12px;color: #4C4C4C;">
			  				<tr><td>呼叫发布者</td></tr>
			  				<tr><td>用户名:<s:property value="callInfo.userInfo.userName"/></td></tr>
			  				<tr><td>
			  				<s:if test="#session['user']==null">
			  					<a onclick="send()">发送信息</a>|<a onclick="send()">加为好友</a>
			  				</s:if>
			  				<s:else>
			  					<a target="_blank" href="gongxu/Comm_getMessAll.shtml?mess.inUser=<s:property value="callInfo.userInfo.userName"/>">发送信息</a>|<a >加为好友</a>
			  				</s:else>
			  				</td></tr>
			  			</table>
			  			</td></tr>
			  			<tr><td></td></tr>
			  			<tr><td>
			  			<s:if test="#session['user']==null">
			  				<img src="css/img/collection1.gif"/>
			  			</s:if>
			  			<s:else>
			  				<s:form id="coll" name="coll" action="Comm_addColl" namespace="/gongxu">
			  					<s:hidden name="coll.callInfo.callId" value="%{callInfo.callId}"></s:hidden>
			  				</s:form>
			  				<img src="css/img/collection.gif" border="0px" onclick="checkCall(<s:property value="callInfo.callId"/>,<s:property value="%{#session.user.userInfoId}"/>)"/>
			  			</s:else>	
			  			</td></tr>
			  		</table>
  				</td>
  			</tr>
  			<tr>
  				<td align="right">呼叫编号:</td><td align="left"><s:property value="callInfo.callNo"/> </td>
  			</tr>
  			<tr>
  				<td align="right">呼叫名称:</td><td align="left"><s:property value="callInfo.callName"/> </td>
  			</tr>
  			<tr>
  				<td align="right">登记时间:</td><td align="left"><s:date name="callInfo.logTime" format="yyyy:MM:dd HH:mm:ss"/></td>
  			</tr>
  			<tr>
  				<td align="right">到期时间:</td><td align="left"><s:date name="callInfo.dueTime" format="yyyy:MM:dd"/> </td>
  			</tr>
  			<tr>
  				<td align="right">状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态:</td><td align="left">
				<s:if test="callInfo.state==0">
					进行中
				</s:if>
				<s:elseif test="callInfo.state==1">
					已关闭
				</s:elseif>
				</td>
  			</tr>
  			<tr>
  				<td align="right">点&nbsp;&nbsp;击&nbsp;&nbsp;数:</td><td align="left"><s:property value="callInfo.onclick"/> </td>
  			</tr>
  			<tr>
  				<td colspan="2">呼叫描述</td>
  			</tr>
  			<tr>
  				<td colspan="3">
  				<div style="width: 100%;">
  					${callInfo.callDis }
  				</div>	
  				</td>
  			</tr>
  		</table>
  		</div>
  	</div>
  	<!-- 评论 -->
  	<div style="width: 550px">
	  	<table width="100%">
	  		<tr align="left"><td style="border-style: solid;border-width: 1px;">共有评论</td></tr>
	  		<s:iterator value="#request.commList" id="comm">
	  		<tr><td>
	  		<div style="margin-bottom: 2px;border-style: solid;border-width: 1px;">
	  			<div><table width="100%">
	  			<tr style="font-size: 12px;color: black;"><td>回复于：<s:date name="sendTime" format="yyyy年MM月dd日 HH:mm:ss"/></td> 
	  			<td align="right">来自：<s:property value="userInfo.userName"/></td></tr>
	  			</table></div>
	  			<div style="border-top-style: solid;border-top-width: 1px;"><table><tr><td>${centent}</td></tr></table></div>
	  		</div>
	  		</td></tr>
	  		</s:iterator>
	  	</table>
  		
  		<table width="100%">
  			<tr><td  style="border-style: solid;border-width: 1px;">发表评论</td></tr>
  			<s:if test="#session['user']==null">
  			<tr><td>你还没有登录，无法发表评论，请先登录！</td></tr>
  			<tr><td>
  			<img src="css/img/login1.gif" onclick="javascript:location.href='index.jsp'"/>
			<img src="css/img/register.gif" onclick="javascript:location.href='register.jsp'"/>
			</td></tr>
  			</s:if>
  			<s:else>
  				<s:form action="Comm_addComm" method="post" namespace="/gongxu">
  				<s:hidden name="commentary.callId" value="%{#request.callInfo.callId}"></s:hidden>
  			    <s:hidden name="commentary.userInfo.userInfoId" value="%{#session.user.userInfoId}"></s:hidden>
  				<tr><td><s:textarea name="commentary.centent" rows="3" cols="45"></s:textarea>
  				<script language="javascript1.2">
				  generate_wysiwyg('commentary.centent');
				</script>
  				</td></tr>
  				<tr><td><s:submit label="发表" value="发表"></s:submit> </td></tr>
  				</s:form>
  			</s:else>
  		</table>
  	</div>
  	</div>
  	<div style="width: 246px;float:right;border-style: solid;height: 100%;border-width: 1px;">广告</div>
  	</div>
  </div>	
  <jsp:include page="bottom.jsp"></jsp:include>
  </body>
</html>
